#include<bits/stdc++.h>
using namespace std;

#define int long long 
#define mod 998244353
#define inf 0x3f3f3f3f
#define N 200010
int a[N],n,res;
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%lld",&n);
    for(int i=1;i<=n;++i){
        int x;
        scanf("%lld",&x);
        a[x]++;
    }
    for(int i=1;i<=100000;++i){
        if(a[i]>=res){
            res=0;
        }
        else res-=a[i];
        res+=a[i];
    }
    printf("%lld\n",res);
    return 0;
}